package com.wlient.basic.designPattern.factory.Impl;

import com.wlient.basic.designPattern.factory.ConfigQueryFactory;
import com.wlient.basic.designPattern.factory.base.BaseConfig;
import com.wlient.basic.designPattern.factory.base.SchoolConfig;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author: 史炜立
 * @description: TODO
 * @date: 2023/3/16 11:16
 */
@Component
public class getConfig {

    @Resource
    private ConfigQueryFactory configQueryFactory;

    @Test
    public void getType(){
        BaseConfig baseConfig = configQueryFactory.of(2);
//        BaseConfig baseConfig = new SchoolConfig();
        System.out.println(baseConfig);
    }
}
